package disjunction.examples.entities
{
	import disjunction.core.*;
	import disjunction.core.geom.Vector2;
	
	import flash.events.Event;
	
	[SWF(width="550", height="400", backgroundColor="#000000", frameRate="500")]
	
	/**
	 * States Example.
	 *
	 * @author Nick Wiggill
	 */
	
	public class EntitiesDemo extends Game
	{		
		public function EntitiesDemo()
		{
			//we require a stage to be ready before passing it in.
			addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
		}
		
		public function addedToStageHandler(e:Event):void
		{
			removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
			
			registerState( new GameState("Demo") );
			var data:Object = {viewContext: this, viewDimensions: new Vector2(stage.stageWidth, stage.stageHeight)};
			initialise("Demo", new DemoController(), data);
		}
	}
}